package com.example.zaq.model;

import lombok.Data;

import java.io.Serializable;

/**
 * asp_text_group
 * @author 
 */
@Data
public class AspTextGroup implements Serializable {
    private Integer gId;
    /**
     * 返回信息
     */
    private  String note;
    /**
     * 返回码，>0表示成功
     */
    private  Integer code;
    /**
     * 分组名称
     */
    private String gName;

    /**
     * 分组说明
     */
    private String gText;

    /**
     * 分组创建时间，创建后不可修改
     */
    private Integer gBeginTime;

    /**
     * 分组最后更新日期
     */
    private Integer gEndTime;

    /**
     * 默认分组，一个用户只允许有一个默认分组
     */
    private Boolean gDefault;

    /**
     * 用户ID，外键
     */
    private Integer uId;

    /**
     * 模板ID，外键
     */
    private Integer tgId;

    /**
     * 删除标志，1表示已删除
     */
    private Boolean delete;

    private static final long serialVersionUID = 1L;

    public Integer getgId() {
        return gId;
    }

    public void setgId(Integer gId) {
        this.gId = gId;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getgName() {
        return gName;
    }

    public void setgName(String gName) {
        this.gName = gName;
    }

    public String getgText() {
        return gText;
    }

    public void setgText(String gText) {
        this.gText = gText;
    }

    public Integer getgBeginTime() {
        return gBeginTime;
    }

    public void setgBeginTime(Integer gBeginTime) {
        this.gBeginTime = gBeginTime;
    }

    public Integer getgEndTime() {
        return gEndTime;
    }

    public void setgEndTime(Integer gEndTime) {
        this.gEndTime = gEndTime;
    }

    public Boolean getgDefault() {
        return gDefault;
    }

    public void setgDefault(Boolean gDefault) {
        this.gDefault = gDefault;
    }

    public Integer getuId() {
        return uId;
    }

    public void setuId(Integer uId) {
        this.uId = uId;
    }

    public Integer getTgId() {
        return tgId;
    }

    public void setTgId(Integer tgId) {
        this.tgId = tgId;
    }

    public Boolean getDelete() {
        return delete;
    }

    public void setDelete(Boolean delete) {
        this.delete = delete;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AspTextGroup other = (AspTextGroup) that;
        return (this.getgId() == null ? other.getgId() == null : this.getgId().equals(other.getgId()))
            && (this.getgName() == null ? other.getgName() == null : this.getgName().equals(other.getgName()))
            && (this.getgText() == null ? other.getgText() == null : this.getgText().equals(other.getgText()))
            && (this.getgBeginTime() == null ? other.getgBeginTime() == null : this.getgBeginTime().equals(other.getgBeginTime()))
            && (this.getgEndTime() == null ? other.getgEndTime() == null : this.getgEndTime().equals(other.getgEndTime()))
            && (this.getgDefault() == null ? other.getgDefault() == null : this.getgDefault().equals(other.getgDefault()))
            && (this.getuId() == null ? other.getuId() == null : this.getuId().equals(other.getuId()))
            && (this.getTgId() == null ? other.getTgId() == null : this.getTgId().equals(other.getTgId()))
            && (this.getDelete() == null ? other.getDelete() == null : this.getDelete().equals(other.getDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getgId() == null) ? 0 : getgId().hashCode());
        result = prime * result + ((getgName() == null) ? 0 : getgName().hashCode());
        result = prime * result + ((getgText() == null) ? 0 : getgText().hashCode());
        result = prime * result + ((getgBeginTime() == null) ? 0 : getgBeginTime().hashCode());
        result = prime * result + ((getgEndTime() == null) ? 0 : getgEndTime().hashCode());
        result = prime * result + ((getgDefault() == null) ? 0 : getgDefault().hashCode());
        result = prime * result + ((getuId() == null) ? 0 : getuId().hashCode());
        result = prime * result + ((getTgId() == null) ? 0 : getTgId().hashCode());
        result = prime * result + ((getDelete() == null) ? 0 : getDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "AspTextGroup{" +
                "gId=" + gId +
                ", note='" + note + '\'' +
                ", code=" + code +
                ", gName='" + gName + '\'' +
                ", gText='" + gText + '\'' +
                ", gBeginTime=" + gBeginTime +
                ", gEndTime=" + gEndTime +
                ", gDefault=" + gDefault +
                ", uId=" + uId +
                ", tgId=" + tgId +
                ", delete=" + delete +
                '}';
    }
}